package mapred.example.model;

import java.util.HashMap;
import java.util.Map;

public class Index {

    private Map<Field, String> map = new HashMap<Field, String>();

    public void addField(String name, String value) {
        map.put(Field.valueOf(name), value);
    }

    public boolean ready() {
        return (map.size() == Field.values().length);
    }

    public String get(Field name) {
        return map.get(name);
    }
    
    public static enum Field {

        RAW_URL,
        HASH_ID,
        URL,
        DELETE_TAG,
        PAGE_RANK,
        HOST_RANK,
        TRUST_RANK,
        TITLE,
        META,
        ANCHOR,
        QUERY_LOG,
        BODY;

    }

}
